import axiosInstance from "../axiosInstance"

const orderInfo = {
    submitOrder(userOrder) {
        return axiosInstance.post(`/orderInfo/submitOrder`, userOrder, {
            headers: {
                "Content-Type": "application/json"
            }
        });
    },
    aliPay(id) {
        return axiosInstance.post(`/orderInfo/aliPay`, { id });
    },
    getListByPage({ pageIndex = 1, pageSize = 5, order_status }) {
        return axiosInstance.get(`/orderInfo/getListByPage`, {
            params: {
                pageIndex,
                pageSize,
                order_status
            }
        })
    },
    findById(id) {
        return axiosInstance.get(`/orderInfo/findById/${id}`);
    },

}

export default orderInfo;